package pattern.spring.controller;


import pattern.spring.service.UserService;
import ylh.mySpring.context.ApplicationContext;
import ylh.mySpring.context.support.ClassPathXmlApplicationContext;

public class UserController {
    public static void main(String[] args) throws Exception {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserService userService = applicationContext.getBean("userService", UserService.class);
        userService.add();
    }
}
